3.7 \(\int \csc ^3(x) (a \cos (x)+b \sin (x)) \, dx\)

Optimal. Leaf size=15 \[ -\frac{1}{2} a \csc ^2(x)-b \cot (x) \]

[Out]

-(b*Cot[x]) - (a*Csc[x]^2)/2

________________________________________________________________________________________

Rubi [A]  time = 0.043457, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357, Rules used = {3089, 3767, 8, 2606, 30} \[ -\frac{1}{2} a \csc ^2(x)-b \cot (x) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^3*(a*Cos[x] + b*Sin[x]),x]

[Out]

-(b*Cot[x]) - (a*Csc[x]^2)/2

Rule 3089

Int[sin[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[sin[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \csc ^3(x) (a \cos (x)+b \sin (x)) \, dx &=\int \left (b \csc ^2(x)+a \cot (x) \csc ^2(x)\right ) \, dx\\ &=a \int \cot (x) \csc ^2(x) \, dx+b \int \csc ^2(x) \, dx\\ &=-(a \operatorname{Subst}(\int x \, dx,x,\csc (x)))-b \operatorname{Subst}(\int 1 \, dx,x,\cot (x))\\ &=-b \cot (x)-\frac{1}{2} a \csc ^2(x)\\ \end{align*}

Mathematica [A]  time = 0.0079179, size = 15, normalized size = 1. \[ -\frac{1}{2} a \csc ^2(x)-b \cot (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^3*(a*Cos[x] + b*Sin[x]),x]

[Out]

-(b*Cot[x]) - (a*Csc[x]^2)/2

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 14, normalized size = 0.9 \begin{align*} -{\frac{a}{2\, \left ( \sin \left ( x \right ) \right ) ^{2}}}-b\cot \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^3*(a*cos(x)+b*sin(x)),x)

[Out]

-1/2*a/sin(x)^2-b*cot(x)

________________________________________________________________________________________

Maxima [A]  time = 1.18897, size = 20, normalized size = 1.33 \begin{align*} -\frac{b}{\tan \left (x\right )} - \frac{a}{2 \, \sin \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3*(a*cos(x)+b*sin(x)),x, algorithm="maxima")

[Out]

-b/tan(x) - 1/2*a/sin(x)^2

________________________________________________________________________________________

Fricas [A]  time = 0.458895, size = 59, normalized size = 3.93 \begin{align*} \frac{2 \, b \cos \left (x\right ) \sin \left (x\right ) + a}{2 \,{\left (\cos \left (x\right )^{2} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3*(a*cos(x)+b*sin(x)),x, algorithm="fricas")

[Out]

1/2*(2*b*cos(x)*sin(x) + a)/(cos(x)^2 - 1)

________________________________________________________________________________________

Sympy [A]  time = 13.2413, size = 17, normalized size = 1.13 \begin{align*} - \frac{a}{2 \sin ^{2}{\left (x \right )}} - \frac{b \cos{\left (x \right )}}{\sin{\left (x \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**3*(a*cos(x)+b*sin(x)),x)

[Out]

-a/(2*sin(x)**2) - b*cos(x)/sin(x)

________________________________________________________________________________________

Giac [A]  time = 1.11529, size = 18, normalized size = 1.2 \begin{align*} -\frac{2 \, b \tan \left (x\right ) + a}{2 \, \tan \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3*(a*cos(x)+b*sin(x)),x, algorithm="giac")

[Out]

-1/2*(2*b*tan(x) + a)/tan(x)^2